package com.phantasy
{
	import com.phantasy.caches.CacheLoader;
	import com.phantasy.loaders.ResourcePool;
	import com.phantasy.managers.ui.style.StyleManager;
	import com.phantasy.ui.skins.CheckBoxSkin;
	import com.phantasy.ui.skins.ListSkin;
	import com.phantasy.ui.skins.NumericStepperSkin;
	import com.phantasy.ui.skins.PageBarSkin;
	import com.phantasy.ui.skins.PageSimpleBarSkin;
	import com.phantasy.ui.skins.PanelSkin;
	import com.phantasy.ui.skins.ScrollBarSkin;
	import com.phantasy.ui.skins.Skin;
	import com.phantasy.ui.skins.SliderSkin;
	import com.phantasy.ui.skins.TabBarSkin;
	import com.phantasy.ui.skins.TabNavigationSkin;
	import com.phantasy.ui.style.BitmapDataPool;
	import com.phantasy.ui.style.IStyle;
	
	import flash.display.BitmapData;
	import flash.text.TextFormat;
	
	public class Style implements IStyle
	{
		private static var instance:Style;
		
		private static var pool:BitmapDataPool;
		public function Style()
		{
			
		}
		/**
		 *获取样式实例 
		 * @return 
		 * 
		 */		
		public static function getInstance():Style
		{
			if (instance == null)
			{
				instance = new Style();
			}
			return (instance);
		}
		/**
		 *初始化样式 
		 * 
		 */		
		public function startInit():void
		{
			StyleManager.getInstance().setUpStyle(this);
			pool = BitmapDataPool.getInstance();
			
		}
		
		/**
		 *获取UI位图数据 
		 * @param url
		 * @param className
		 * @return 
		 * 
		 */		
		public static function getUIBitmapData(url:String, className:String):BitmapData
		{
			var btClass:Class;
			if((url==null)||(className==null)){
				return null;
			}
			
			var btmapData:BitmapData = pool.getBitmapData(className, url);
			if(btmapData==null){
				btClass = getClass(url, className);
				if(btClass){
					btmapData = new btClass(0,0);
					pool.addBitmapData(className, url, btmapData);
				}
			}
			return btmapData;
		}
		
		public static function getClass(_arg1:String, _arg2:String):Class
		{
			return ResourcePool.getClass(_arg1, _arg2) as Class;
		}
		
		
		public function get textFormat():TextFormat
		{
			return null;
		}
		
		public function get buttonSkin():Skin
		{
			return null;
		}
		
		public function get selectedSkin():Skin
		{
			return null;
		}
		
		public function get scrollBarSkin():ScrollBarSkin
		{
			return null;
		}
		
		public function get tabBarSkin():TabBarSkin
		{
			return null;
		}
		
		public function get checkBoxSkin():CheckBoxSkin
		{
			return null;
		}
		
		public function get comboBoxSkin():Skin
		{
			return null;
		}
		
		public function get listSkin():ListSkin
		{
			return null;
		}
		
		public function get textInputSkin():Skin
		{
			return null;
		}
		
		public function get textAreaSkin():Skin
		{
			return null;
		}
		
		public function get radioButtonSkin():CheckBoxSkin
		{
			return null;
		}
		
		public function get panelSkin():PanelSkin
		{
			return null;
		}
		
		public function get listItemSkin():Skin
		{
			return null;
		}
		
		public function get numericStepperSkin():NumericStepperSkin
		{
			return null;
		}
		
		public function get textScrollSkin():ScrollBarSkin
		{
			return null;
		}
		
		public function get sliderSkin():SliderSkin
		{
			return null;
		}
		
		public function get tabNavigationSkin():TabNavigationSkin
		{
			return null;
		}
		
		public function get pageSimpleBarSkin():PageSimpleBarSkin
		{
			return null;
		}
		
		public function get pageBarSkin():PageBarSkin
		{
			return null;
		}
	}
}